package mysql

import (
	"fmt"
	"fresh-food/inits/initialize"
	"fresh-food/models"
)

func MysqlInit() {
	err := initialize.DB.AutoMigrate(&models.User{}, &models.Product{}, &models.ProductAttribute{}, &models.Order{})
	if err != nil {
		fmt.Println("数据迁移失败")
		return
	} else {
		fmt.Println("数据迁移成功")
	}
}
